package com.bolun998300.personal_blog_springboot.dao;

import com.bolun998300.personal_blog_springboot.pojo.Comment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface CommentDao extends JpaRepository<Comment,Integer> {
    public Page<Comment> findByStateOrderByCommentDateDesc(int state, Pageable pageable);
    public List<Comment> findByBlogIdAndStateOrderByCommentDateDesc(int blogId,int state);
    public Page<Comment> findAllByOrderByCommentDateDesc(Pageable pageable);
}
